package com.song;

import com.song.model.Order;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @ClassName : OrderServiceProviderMain
 * @Author : 司猫子
 * @Date: 2021/2/26 0:50
 */
public class OrderServiceProviderMain {
    public static void main(String[] args) throws IOException {
        String config = "orderservice-provider.xml";
        ClassPathXmlApplicationContext cpx = new ClassPathXmlApplicationContext(config);
        cpx.start();
        System.out.println("Dubbo服务提供者启动");

//        System.in.read();
//        System.out.println("read之后的代码");
        Order order = (Order) cpx.getBean("myOrder");
        System.out.println("拿到了order对象"+ order);
    }
}
